import http from '@http';

const API_PREFIX = '/system/dict';

export function fetchGetDictList(values = {}) {
  return http.post(API_PREFIX + '/list', values);
}

export function fetchGetDict(dictId) {
  return http.get(`${API_PREFIX}/detail/${dictId}`);
}

export function fetchAddDict(params) {
  return http.post(API_PREFIX + '/insert', params);
}

export function fetchUpdateDict(params) {
  return http.post(API_PREFIX + '/update', params);
}

export function fetchUpdateDictStatus(params) {
  return http.post(API_PREFIX + '/update/status', params);
}

export function fetchDeleteDict(ids) {
  return http.post(API_PREFIX + '/delete', ids);
}
